home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-03 | 42.5 KB | 1,021 lines |
- C.S.M.P. Digest Tue, 28 Apr 92 Volume 1 : Issue 61
-
- Today's Topics:
-
- comparing two ressource fork
- NewsWatcher -- program advice needed
- How to buy Zortech C++ ed. disc.!!?
- MPW lib and dependencies
- Writing a ResEdit editor - Questions & bugs
- __NewPtr
- Sound resources
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: cdoucet@mais.hydro.qc.ca (cdoucet)
- Subject: comparing two ressource fork
- Date: 26 Mar 92 01:51:24 GMT
-
- is there any program that compare two resource fork and
- give the difference???
- thank's is advance
-
- thered@rot.qc.ca
- Eric Surprenant
-
- +++++++++++++++++++++++++++
-
- From: Michael_Hecht@mac.sas.com (Michael Hecht)
- Date: 26 Mar 92 15:07:16 GMT
- Organization: SAS Institute Inc.
-
- In article <cdoucet.701574684@tdsb-s>, cdoucet@mais.hydro.qc.ca (cdoucet) writes:
- >
- > is there any program that compare two resource fork and
- > give the difference???
-
- Yes, I wrote one. It's called ResCompare. It also allows you to selectively
- apply the updates from one file to the other. We find this invaluable for
- helping us write multi-user THINK C applications.
-
- It also allows you to save the differences as a self-applying patch.
-
- If you (or anyone else) would like a copy, just send me e-mail. It's free.
-
- - --Michael
-
- =======================================================================
- Michael P. Hecht | Internet: Michael_Hecht@mac.sas.com
- SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
-
- ---------------------------
-
- From: bug@anas.udac.uu.se (Bernt Budde)
- Subject: NewsWatcher -- program advice needed
- Date: 13 Mar 92 18:20:42 GMT
- Organization: UDAC, Uppsala, Sweden
-
- I've got a few questions that's got to be simple:
-
- I'm trying to rewrite the NewsWatcher program to handle > 32kb
- data in the List Manager. My kludge is to store a 2 byte offset
- in the cell to where in an array I store a pointer & length.
- You can get 8000 cells in a list doing so (2 bytes overhead for
- the List Manager).
-
- How do I get the start of the array from the LDEF resource? I
- don't want to muck around with the refcon field or anything. Just
- get 4 byte fixed in memory to store a handle. (refcon -- I want
- as small changes as possible to the rest of the application. Some
- madman might want to use my kludge later! :-)) Oh, to make things
- funnier, I'm doing the LDEF in MPW C (didn't work at once in LC4!)
- so there is no static variables between calls...
-
-
- The second question: If I get this running, can I send it out to
- the rest of the world without stomping on the author's or Apple's
- toes?
-
- My boss allows me to do this on working time, since we would like
- to use NewsWatcher all over the university.
-
- If anyone is interested, drop a note and I'll let you know when I
- put a beta on some anonymous ftp server someplace.
-
-
- Bernt Budde |Religion, n: A daughter of
- bug@udac.uu.se |Hope and Fear, explaining to
- UDAC (Uppsala Univ. Computing Centre) |Ignorance the Nature of the
- |Unknowable.
- Don't for a moment believe UDAC, |
- while being a nice place, have |-Ambrose Bierce, The Devil's
- opinions like me!! | Dictionary
-
- +++++++++++++++++++++++++++
-
- From: sfalken@apple.com (Steven Falkenburg)
- Date: 25 Mar 92 02:52:15 GMT
- Organization: Apple Computer, Inc.
-
- In article <bug.700510842@anas>, bug@anas.udac.uu.se (Bernt Budde) writes:
- >
- > The second question: If I get this running, can I send it out to
- > the rest of the world without stomping on the author's or Apple's
- > toes?
-
- If you get it up and running, I don't have any problem with you
- re-distributing it, provided:
-
- 1) *please* add your name to the about box, and make it clear that I'm
- not providing any support for NewsWatcher
-
- 2) re-distribute the source code to your changes to the rest of the
- internet community.
-
- 3) don't number your version "1.0.3" or "1.1". I'm not sure what to do
- about this, but maybe you should put your initials or the initials
- of your university in as part of the version.
-
- There are now *quite* a few versions of NewsWatcher floating around, with
- little hope of re-integration. The best thing to do would probably set
- up some kind of an FTP site where people could put source code for
- modified versions. That way, if someone wanted, there might be some way
- for the code to be re-integrated.
-
- Note that I'm not volunteering. I don't have time, or permission, in my
- current job to devote a good percentage of my time to NewsWatcher. It's
- simply unsupportable by me. I have source to about 3-4 different
- NewsWatchers right now, and am not quite sure what to do with them. I've
- also got some preliminary source to a >32k text viewer, but no time to
- integrate it. Maybe some kind of electronic group could be organized to
- work on integrating changes and provide some support, since it appears
- there are many people using NewsWatcher on the net.
-
- - -steve falkenburg
- MacDTS -- Author of NewsWatcher & XferIt
- sfalken@apple.com
-
- ---------------------------
-
- From: jovanovi@studsys.mscs.mu.edu (Steve Jovanovic)
- Subject: How to buy Zortech C++ ed. disc.!!?
- Date: 16 Mar 92 21:42:22 GMT
- Organization: Marquette University - Department MSCS
-
- Hi Netters,
-
- I've checked around, and it seems that the best bet for
- getting an affordable C++ compiler is Zortech C++. It
- looks like the only two choices are MPW and Zortech. The
- great news is that Zortech C++ is supposedly available for
- academic purchase for $110 (without MPW) and I think $150
- with.
-
- And now the bad news... I called Symantec and was bounced
- from person to person...they all kept saying try another
- number, etc. It looks like Symantec doesn't plan on promoting
- Zortech C++ for the Mac--most of the people at Symantec I
- spoke with didn't even know it existed.
-
- I was finally given the number for a company called EduTech.
- >From what I gather, they're a clearinghouse for educationally
- discounted software. I've confirmed the $110 price above.
- BUT they only sell to university bookstores, etc., and I think
- they require the seller to buy a bunch of copies of any particular
- product.
-
- I spoke with the people at my university's bookstore, and they
- only deal with one distributor--it was a dead-end in terms of
- getting ZTC++. I also spoke with a local Apple dealer which
- handles educational sales for our uni, and no luck there either.
-
- Has anyone had any luck in buying an ed. disc. copy of Zortech
- C++? If other people are having the same kinds of problems I
- am, maybe we can get a group of interested buyers together and
- try and work something out with the powers that be?
-
- Thanks,
-
- steve jovanovic jovanovi@studsys.mscs.mu.edu
-
-
- +++++++++++++++++++++++++++
-
- From: stevem@cs.utexas.edu (Steve Anthony Mariotti)
- Date: 23 Mar 1992 18:02:31 -0600
- Organization: U Texas Dept of Computer Sciences, Austin TX
-
- In article <2501@spool.mu.edu> jovanovi@studsys.mscs.mu.edu (Steve Jovanovic) writes:
-
- >Has anyone had any luck in buying an ed. disc. copy of Zortech
- >C++? If other people are having the same kinds of problems I
- >am, maybe we can get a group of interested buyers together and
- >try and work something out with the powers that be?
-
- The University of Texas Union Microcenter (the largest dealer of Apple
- Macintosh computers in the country) has it for sale for $71. I called them
- up to ask them some questions about it, and they couldn't tell me anything
- other than the price and the fact that they didn't have any in stock, but
- would order it for me if I came in and paid for it. No thanks.
-
- The only person I spoke with who seemed knowledgable about programming
- environments on the Mac said that Symantec doesn't plan to support the
- Zortech C++ compiler, and that the C++ features that it offers will likely
- by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
- supports.
-
- This, coupled with the possible fact that Zortech C++ will require MPW, makes
- the whole thing seem pointless.
-
- Any news on the release date of THINK C 6.0 and what features it will offer?
-
- Steve Mariotti
-
-
-
-
- +++++++++++++++++++++++++++
-
- From: siegel@world.std.com (Rich Siegel)
- Date: 24 Mar 92 00:31:55 GMT
- Organization: Symantec Language Products Group
-
- In article <kssscnINNt8f@earth.cs.utexas.edu> stevem@cs.utexas.edu (Steve Anthony Mariotti) writes:
- >
- >The only person I spoke with who seemed knowledgable about programming
- >environments on the Mac said that Symantec doesn't plan to support the
- >Zortech C++ compiler, and that the C++ features that it offers will likely
- >by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
- >supports.
-
- You should have talked to more people. :-)
-
- Zortech C++ version 2.1.3 for use with MPW was recently released.
- By Symantec. The Languages Group Tech Support staff does support Zortech C++,
- both for the Mac and for the PC.
-
- I'm not closely connected with the project, but those who worked
- on the recent release say that it's much better than the previous releases.
-
- Version 3.0 of the MPW compiler is in the works. So much for
- "doesn't plan to support".
-
- >Any news on the release date of THINK C 6.0 and what features it will offer?
-
- As always, Symantec never pre-announces features or release dates,
- so anything you hear on those topics is rumor or speculation.
-
- R.
-
-
-
- - --
- - -----------------------------------------------------------------------
- Rich Siegel Internet: siegel@world.std.com
- Senior Software Engineer Applelink: SIEGEL
- Symantec Languages Group
-
- +++++++++++++++++++++++++++
-
- From: suitti@ima.isc.com (Stephen Uitti)
- Organization: Interactive Systems, Cambridge, MA 02138-5302
- Date: Tue, 24 Mar 1992 16:43:57 GMT
-
- In article <BLLDH8.7uy@world.std.com> siegel@world.std.com (Rich Siegel) writes:
- > Zortech C++ version 2.1.3 for use with MPW was recently released.
- >By Symantec. The Languages Group Tech Support staff does support Zortech C++,
- >both for the Mac and for the PC.
-
- I have the 2.1.3b3 - I imagine it is a beta. It does not support
- large model (an MPWism). I was not able to get anything to link.
- Large model seems like a requirement for an OOP language. Any
- libraries you are likely to want to use will be "large".
-
- I did spend a week attempting to get a library to compile. This
- was straight C code, that already compiled and ran under MPW C and
- Think C. I ran into eight distinct bugs in the parser, including
- a completely unique implementation of the "Pascal" & "pascal" keyword.
-
- I was not able to evaluate the speed of the compiler or the speed
- of the compiled code.
-
- > As always, Symantec never pre-announces features or release dates,
- >so anything you hear on those topics is rumor or speculation.
-
- And I consider this a "good" thing. I don't really want my managers
- to be tempted to base the project I'm working on on some product that
- has been announced but not shipped.
-
- My attempt to use Zortech was to get around poor code generated
- by MPW C. Think C was generating code that ran twice as fast as
- MPW C for the same code. We narrowed it down to "divide by
- constant power-of-2" sequences. Think C turned it into the
- appropriate shift, MPW left it as divide. I don't recall if the
- variables involved were signed or unsigned. If they were signed,
- the conversion to shift could be considered unsafe.
-
- Stephen.
- suitti@ima.isc.com
-
- +++++++++++++++++++++++++++
-
- From: shite@sinkhole.unf.edu (Stephen Hite)
- Date: 24 Mar 92 14:19:42 GMT
- Organization: University of North Florida, Jacksonville
-
- In article <kssscnINNt8f@earth.cs.utexas.edu> stevem@cs.utexas.edu (Steve Anthony Mariotti) writes:
- >In article <2501@spool.mu.edu> jovanovi@studsys.mscs.mu.edu (Steve Jovanovic) writes:
- >
- >>Has anyone had any luck in buying an ed. disc. copy of Zortech
- >>C++? If other people are having the same kinds of problems I
- >
- >The only person I spoke with who seemed knowledgable about programming
- >environments on the Mac said that Symantec doesn't plan to support the
- >Zortech C++ compiler, and that the C++ features that it offers will likely
- >by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
- >supports.
- >
- >This, coupled with the possible fact that Zortech C++ will require MPW, makes
- >the whole thing seem pointless.
- >
- >Any news on the release date of THINK C 6.0 and what features it will offer?
- >
- >Steve Mariotti
-
-
- If what you say is true, then it's a nasty way of creating a C++ compiler.
- Zortech C++ was created from using Datalight C as a base from which to
- build. What this leads to (instead of using a YACC-able grammar) is
- at least an order of magnitude more blowouts during parsing because
- of incorrect parsing when an ambiguity fails to get resolved (by lexer/
- lookahead hacking). There's a lot more munging going on between the
- scanner and parser (due to the ambiguous nature of C++). Jim Roskind
- has shown that a production quality C++ YACC-able grammar can be
- constructed so as to resolve much of the ambiguity which greatly reduces
- the "smartness" of the lexer.
-
- Symantec has a hairy job on their hands if they plan to cross-pollinate
- Think C and Zortech C++. I'm get the creeps....I'm outa here.
-
-
- Steve Hite
- shite@sinkhole.unf.edu
-
- +++++++++++++++++++++++++++
-
- From: mkahl@world.std.com (Michael Kahl)
- Date: 25 Mar 92 22:18:47 GMT
- Organization: Enginuity Inc.
-
- In article <1992Mar24.164357.20050@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
- >Think C was generating code that ran twice as fast as
- >MPW C for the same code. We narrowed it down to "divide by
- >constant power-of-2" sequences. Think C turned it into the
- >appropriate shift, MPW left it as divide. I don't recall if the
- >variables involved were signed or unsigned. If they were signed,
- >the conversion to shift could be considered unsafe.
- >
-
- Must have been unsigned, or THINK C would have left it as divide,
- for exactly that reason.
-
- - --
- Michael Kahl, Software Architect, Enginuity Inc.
- mkahl@world.std.com -or- 75236.3146@compuserve.com
- Disclaimer: Whoa! Did I say THAT??!
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 25 Mar 92 17:32:21 GMT
- Organization: MacDTS Mongols
-
- In article <kssscnINNt8f@earth.cs.utexas.edu>, stevem@cs.utexas.edu (Steve
- Anthony Mariotti) writes:
- > The only person I spoke with who seemed knowledgable about programming
- > environments on the Mac said that Symantec doesn't plan to support the
- > Zortech C++ compiler, and that the C++ features that it offers will likely
- > by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
- > supports.
-
- That's interesting, I beta tested the latest Zortech C++ release
- last Christmas...
-
- Cheers,
- Kent
-
- PS: Nope, won't support MacApp 3.0 yet.
- - --
- Kent Sandvik/DTS - Dynamic Language Evangelist.
- Opinions expressed are not private, and not owned by any company,
- organization or group. Happy happy, joy joy!
-
- ---------------------------
-
- From: aep@world.std.com (Andrew E Page)
- Subject: MPW lib and dependencies
- Organization: The World Public Access UNIX, Brookline, MA
- Date: Wed, 18 Mar 1992 14:33:21 GMT
-
- The MPW User's manual suggests using lib to consolodate
- object files in order to increase the speed of linking
- in building a project.
-
- I have been experimenting with this and found it to be quite
- tru.
-
- I have found a method of architecting build files (.make files)
- so that parts of a project are broken down into sections,
- and each section is libraried accordingly as needed and
- then linked into the final product.
-
- I am thiking about writing an article (for posting or maybe for
- publication) outlining this and giving examples of how to
- implement this.
-
- Is there any interested from the net on such techniques
- and would anyone be interested in seeing the article?
-
- - --
- Andrew E. Page CTO(Warrior Poet)| Decision and Effort The Archer and Arrow
- DSP Ironworks | The difference between what we are
- Macintosh and DSP Technology | and what we want to be.
-
- +++++++++++++++++++++++++++
-
- From: aep@world.std.com (Andrew E Page)
- Organization: The World Public Access UNIX, Brookline, MA
- Date: Thu, 19 Mar 1992 14:33:32 GMT
-
- Something else.....
-
-
- In writing this article are there any tricks/techniques that you
- feel you would like to have adressed. Is ther something that you wish
- a makefile could do for you, but you just have not figured out how?
-
-
- - --
- Andrew E. Page CTO(Warrior Poet)| Decision and Effort The Archer and Arrow
- DSP Ironworks | The difference between what we are
- Macintosh and DSP Technology | and what we want to be.
-
- +++++++++++++++++++++++++++
-
- From: cnbr01@vaxa.strath.ac.uk
- Date: 26 Mar 92 11:40:15 GMT
- Organization: Strathclyde University VAX Cluster
-
- In article <BLBCFL.HDn@world.std.com>, aep@world.std.com (Andrew E Page) writes:
- >
- > I have found a method of architecting build files (.make files)
- > so that parts of a project are broken down into sections,
- > and each section is libraried accordingly as needed and
- > then linked into the final product.
- >
- > I am thiking about writing an article (for posting or maybe for
- > publication) outlining this and giving examples of how to
- > implement this.
-
- > Is there any interested from the net on such techniques
- > and would anyone be interested in seeing the article?
-
- Yes some one is interested here.
- B.rasheed@uk.ac.strathclyde.vaxa
-
- ---------------------------
-
- From: deadman@garnet.berkeley.edu (Ben Haller)
- Subject: Writing a ResEdit editor - Questions & bugs
- Date: 19 Mar 92 01:39:12 GMT
- Organization: Stick Software
-
-
- I am embarking upon writing a ResEdit editor. I have (actually, Patrick
- Beard has) already converted the interfaces to be THINK C 5.0 compatable,
- so I'm off to a good start. I've got the example editor compiling and
- running in ResEdit with no problem.
- So now I have a few questions, and a few bugs in the manual to report.
-
- 1. It seems that the name of the editor resource is not "@TYPE", but
- has a leading null in it, making it a total length of 6 characters.
- This is not documented anywhere in Chapter 7 of the 2.1 RE manual.
- 2. Are you *really* supposed to call BubbleUp in the two places that
- the example code does? The docs say "It is important to call BubbleUp
- to avoid heap fragmentation", but this sounds like a classic case of
- knee-jerk MoveHHi-calling. Is there a *good* reason to call
- BubbleUp in those places, or is this just a case of summer interns who
- don't know what they're doing writing this stuff? (note: I know why
- BubbleUp / MoveHHi is supposed to be called - that is, I know what
- it does. But many people advocate calling MoveHHi *whenever* you lock
- a handle, which is downright stupid and causes massive thrashing of
- your heap zone for no reason. I am trying to determine whether these
- calls are a good or a bad idea in this particular case, not in general)
- 3. The example code does not call SetPort((*object)->wind) after creating
- its window in the EditBirth routine. It seems to assume that
- EditorWindSetup will set the port to the window created. But that is
- not specified in the EditorWindSetup description. Is this a bug in
- the sample code? In the docs it says, paraphrased, "If EditBirth will
- need to access the current port, call 'SetPort((*object)->wind)'", but
- they don't, so I conclude that one or the other is wrong. No?
- 4. Mainly out of curiosity: The functions SetETitle and GetWindowTitle
- perform, respectively, the operations of *getting* the editor's title
- and *setting* the windows title, as far as any logical application
- of those words goes. So why are the names reversed?
- 5. In the section labelled "Routines used by editors" is a function called
- "NoDoubleClickHere", which says in its description "call this...if you
- don't want ResEdit to convert a double-click at this location to an
- Open command." An Open command opening *what*? What exactly is
- ResEdit going to open when the user double-clicks in my editor's
- window? I am utterly mystified by this function. Do I really need to
- call it? I have a feeling it's supposed to be in the "Pickers"
- section, but maybe I'm just clueless.
- 6. FindOwnerWindow could be a lot clearer. It is apparently intended
- to keep one editor from releasing a resource that another editor
- is using, but it's not clear how this works at all. Suppose two
- editors both have gotten a handle to ICON 5000. When they call
- FindOwnerWindow, does each editor get the other editor - i.e. do
- they both own it? Or do both of them get the same editor as the
- owner? Perhaps an editor "owns" a resource only if it is *editing*
- that resource - i.e. the ICON 5000 editor would be returned, if
- the user had opened it. But then in the above case, there are
- two people using a resource, neither is actually editing it
- (say they are both dialog editors), so what is keeping one from
- releasing the ICON out from under the other one? I think I have
- a basic lack of understanding here as to how ResEdit is keeping
- track of references to resources. It's obviously doing something
- a lot more sophisticated than the Resource Manager does, but I wish
- they had documented it a little better.
- 7. How exactly are you supposed to use the clipboard? There are
- brief descriptions of ScrapCopy and ScrapEmpty, but this doesn't
- seem sufficient - what about public / private scrap, what about
- getting the contents of the scrap out, or seeing what's there,
- etc.? There is another "internal routine" (are these really for
- internal use only?) called "GetResEditScrapFile" that sounds
- promising, but - what am I supposed to do with it? Is it a resource
- file? What naming, ID, etc. conventions should be followed? Should
- I release resources that I get from this file or not? Etc. etc.
-
- I have a million more questions like this, but I'll stop there.
- I just wonder, is it possible to write a good, stable ResEdit editor
- without pampering from DTS? The documentation seems terribly
- incomplete, unclear, and ambiguous. Are there any more fully-fledged
- editors available with source, from Apple or elsewhere? The standard
- one is really pathetic, it doesn't illustrate half of the things that
- every editor should be able to do. Why doesn't Apple ever release good,
- up-to-date code - this editor is weak, the only WDEF example you can
- get is the rDocProc one from System 6, for g*ds sake - Aargh! If they
- want to make life easy for developers why don't they release and code
- that is actually *usable*?!??
- I could say something offensive about Apple, but I won't :->
-
- - -Ben Haller (deadman@garnet.berkeley.edu)
-
- +++++++++++++++++++++++++++
-
- From: jcav@quads.uchicago.edu (JohnC)
- Date: 19 Mar 92 02:12:11 GMT
- Organization: The Royal Society for Putting Things on Top of Other Things
-
- In article <q8rc0INN2ah@agate.berkeley.edu> deadman@garnet.berkeley.edu (Ben Haller) writes:
- >every editor should be able to do. Why doesn't Apple ever release good,
- >up-to-date code - this editor is weak, the only WDEF example you can
- >get is the rDocProc one from System 6, for g*ds sake - Aargh! If they
- >want to make life easy for developers why don't they release and code
- >that is actually *usable*?!??
-
- There are piles and piles of useable sample code. The System 7 standard
- WDEF source code is available, as is the source to ALL of the System 6.0.x
- standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
- All of this stuff is on ftp.apple.com and/or on the developer CDs. Look a
- little harder next time.
-
-
- - --
- John Cavallino | EMail: jcav@midway.uchicago.edu
- University of Chicago Hospitals | John_Cavallino@uchfm.bsd.uchicago.edu
- Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
- B0 f++ c+ g+ k s+(+) e+ h- pv | Chicago, IL 60637
-
- +++++++++++++++++++++++++++
-
- From: russotto@eng.umd.edu (Matthew T. Russotto)
- Date: Thu, 19 Mar 92 04:31:45 GMT
- Organization: College of Engineering, University of Maryland, College Park
-
- In article <1992Mar19.021211.14013@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
- >
- >There are piles and piles of useable sample code. The System 7 standard
- >WDEF source code is available, as is the source to ALL of the System 6.0.x
- >standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
- >All of this stuff is on ftp.apple.com and/or on the developer CDs. Look a
- >little harder next time.
-
- But the WDEF 0 code is BUGGY-- that is, the grow icon is sometimes
- offset-- see, Apple is providing unusable code AGAIN!!
-
- <inset smiley for the incredibly humor impaired>
- - --
- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu
- Some news readers expect "Disclaimer:" here.
- Just say NO to police searches and seizures. Make them use force.
- (not responsible for bodily harm resulting from following above advice)
-
- +++++++++++++++++++++++++++
-
- From: deadman@garnet.berkeley.edu (Ben Haller)
- Date: 19 Mar 92 19:20:47 GMT
- Organization: Stick Software
-
- In article <1992Mar19.021211.14013@midway.uchicago.edu>
- jcav@midway.uchicago.edu writes:
- >In article <q8rc0INN2ah@agate.berkeley.edu>
- > deadman@garnet.berkeley.edu (Ben Haller) writes:
- >>every editor should be able to do. Why doesn't Apple ever release good,
- >>up-to-date code - this editor is weak, the only WDEF example you can
- >>get is the rDocProc one from System 6, for g*ds sake - Aargh! If they
- >>want to make life easy for developers why don't they release and code
- >>that is actually *usable*?!??
- >There are piles and piles of useable sample code. The System 7 standard
- >WDEF source code is available, as is the source to ALL of the System 6.0.x
- >standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
- >All of this stuff is on ftp.apple.com and/or on the developer CDs. Look a
- >little harder next time.
- I knew about the other defProcs, the CDEF and MDEF and so on. But I had
- no idea those other WDEFs were available; sigh. A good number of months
- ago a friend of mine disassembled and reverse-engineered the System 7
- WDEF to figure out the way that the window colors and handled in System 7
- (I could flame about that being undocumented, but with my luck it's in
- some TN somewhere that I missed :->) So I guess that was wasted effort,
- unless the latest WDEF hadn't been released at that time...
- Well, nobody has so far come up with better sample code for ResEdit
- editors than the really weak XXXX editor, so at least on that point
- I (may) be on stable ground...
- Flaming Apple is a thankless job, but someone's got to do it... :->
- Well, so after all this, does anybody have anything to say about
- the main thrust of my post, ResEdit editors? There seems to be very
- little information out there about these - doesn't anyone write them?
-
- - -Ben Haller (deadman@garnet.berkeley.edu)
- "Do you know how many time zones there are in the Soviet Union?" - NegativLand
-
- +++++++++++++++++++++++++++
-
- From: stanger@otago.ac.nz (Nigel Stanger)
- Date: 20 Mar 92 22:19:44 GMT
- Organization: University of Otago, Dunedin, New Zealand
-
- In article <q8rc0INN2ah@agate.berkeley.edu>,
- deadman@garnet.berkeley.edu (Ben Haller) writes:
- > I am embarking upon writing a ResEdit editor. I have (actually, Patrick
- > Beard has) already converted the interfaces to be THINK C 5.0 compatable,
- > so I'm off to a good start. I've got the example editor compiling and
- > running in ResEdit with no problem.
- > So now I have a few questions, and a few bugs in the manual to report.
- >
- [...]
- > 5. In the section labelled "Routines used by editors" is a function called
- > "NoDoubleClickHere", which says in its description "call this...if you
- > don't want ResEdit to convert a double-click at this location to an
- > Open command." An Open command opening *what*? What exactly is
- > ResEdit going to open when the user double-clicks in my editor's
- > window? I am utterly mystified by this function. Do I really need to
- > call it? I have a feeling it's supposed to be in the "Pickers"
- > section, but maybe I'm just clueless.
-
- Just a guess here - I would say this is related to the likes of
- the DLOG editor. You double-click on the picture of the dialog it
- opens the corresponding DITL. The BNDL editor is much the same -
- double-click a set of icons and it opens the appropriate icon
- resource.
-
- - --
- See ya
- Nigel.
- - ----------------------------------------------------------------------
- Nigel Stanger, Internet: stanger@otago.ac.nz
- University of Otago, Phone: +64 3 479-8179
- Dunedin, NEW ZEALAND. Fax: +64 3 479-8311
- Life is butter melon cauliflower.
-
- +++++++++++++++++++++++++++
-
- From: lim@iris.ucdavis.edu (Lloyd Lim)
- Date: 20 Mar 92 02:14:49 GMT
- Organization: U.C. Davis - Department of Computer Science
-
- In article <qapifINNslo@agate.berkeley.edu> deadman@garnet.berkeley.edu (Ben Haller) writes:
- >In article <1992Mar19.021211.14013@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
- >>In article <q8rc0INN2ah@agate.berkeley.edu> deadman@garnet.berkeley.edu (Ben Haller) writes:
- >>>
- >>>Why doesn't Apple ever release good,
- >>>up-to-date code - this editor is weak, the only WDEF example you can
- >>>get is the rDocProc one from System 6, for g*ds sake - Aargh!
- >>
- >>There are piles and piles of useable sample code. The System 7 standard
- >>WDEF source code is available, as is the source to ALL of the System 6.0.x
- >>standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
- >>All of this stuff is on ftp.apple.com and/or on the developer CDs. Look a
- >>little harder next time.
- >
- > I knew about the other defProcs, the CDEF and MDEF and so on. But I had
- >no idea those other WDEFs were available; sigh. A good number of months
- >ago a friend of mine disassembled and reverse-engineered the System 7
- >WDEF to figure out the way that the window colors and handled in System 7
- >(I could flame about that being undocumented, but with my luck it's in
- >some TN somewhere that I missed :->) So I guess that was wasted effort,
- >unless the latest WDEF hadn't been released at that time...
-
- It was wasted effort. It was documented in TN 298 which was originally
- dated Jan 1991. Granted, the TNs were not making it to the usual
- Internet distribution channels in the last year or so (comp.binaries.mac
- and ftp.apple.com), but it looks like they are finally getting their
- act back together after the layoffs.
-
- There's some saying that goes something like: Knowing the answers to
- questions is not important; it's knowing how to find the answers to questions
- that you don't know. This skill is especially important for student
- programmers that don't have much time or money to waste. :-)
-
- Obligatory Apple flame to replace Ben's:
- Now that it looks like I'll have to maintain an AppleLink account, I've
- noticed the outrageous charges. Since you're already paying a stiff
- $12 per hour, why is there an additional charge per K sent or received?
- And why is there a surcharge for sending and receiving Internet mail?
- Receiving mail? How are you supposed to control this? Maybe we should
- set up an auto-e-mailing program to John Sculley to complain about this...
-
- I guess I should an append an :-) before I get in trouble.
-
- +++
- Lloyd Lim Internet: lim@cs.ucdavis.edu
- America Online: LimUnltd
- Compuserve: 72647,660
- US Mail: 224 Lysle Leach Hall, U.C. Davis, Davis, CA 95616
-
- +++++++++++++++++++++++++++
-
- From: lsr@taligent.com (Larry Rosenstein)
- Date: 25 Mar 92 03:14:49 GMT
- Organization: Taligent, Inc.
-
- In article <11489@ucdavis.ucdavis.edu>, lim@iris.ucdavis.edu (Lloyd Lim) writes:
- >
- > And why is there a surcharge for sending and receiving Internet mail?
- > Receiving mail? How are you supposed to control this? Maybe we should
- > set up an auto-e-mailing program to John Sculley to complain about this...
-
- You can send an empty message to TurnOff@INTERNET# to turn off incoming (and
- outgoing I think) Internet message for a particular AppleLink account.
- (TurnOn@INTERNET# turns this back on.) This was mentioned in the description of
- the Internet gateway service.
-
- I think the surcharge stems from the fact that the company that runs AppleLink
- charges Apple to send and receive these messages; Apple simply passes the cost
- onto the AppleLink users. (The group at Apple that maintains the actual
- gateway, is happy to provide that service for free.)
- - --
- Larry Rosenstein
- Taligent, Inc.
- lsr@taligent.com
-
- ---------------------------
-
- From: erh0362@tesla.njit.edu
- Subject: __NewPtr
- Date: 22 Mar 92 14:32:24 GMT
- Organization: New Jersey Institute of Technology
-
-
- Noodling around in Inside Mac I discovered the NewPtr() and
- NewHandle() functions which seem roughly equivalent to the standard
- library's malloc(). I also found __NewPtr which seems to be an assembly
- equivalent that has the nice feature of allowing one to clear the memory
- first before using it like the standard libraries calloc(). Not being an
- assembly hacker however I was wondering if there's a way in straight
- THINK C to use NewPtr() or something equivalent to get either a handle
- or a pointer to a block of cleared memory?
-
- Elliotte Rusty Harold Department of Applied Mathematics
- elharo@m.njit.edu New Jersey Institute of Technology
- erh0362@tesla.njit.edu Newark, NJ 07103
-
- +++++++++++++++++++++++++++
-
- From: ericd@CATICSUF.CSUFRESNO.EDU (Eric W. Douglas)
- Date: 22 Mar 92 19:51:19 GMT
-
-
- erh0362@tesla.njit.edu writes:
-
-
- > Noodling around in Inside Mac I discovered the NewPtr() and
- >NewHandle() functions which seem roughly equivalent to the standard
- >library's malloc(). I also found __NewPtr which seems to be an assembly
- >equivalent that has the nice feature of allowing one to clear the memory
- >first before using it like the standard libraries calloc(). Not being an
- >assembly hacker however I was wondering if there's a way in straight
- >THINK C to use NewPtr() or something equivalent to get either a handle
- >or a pointer to a block of cleared memory?
-
- Use NewPtrClear() or NewHandleClear()... both of these are illustrated
- in Tech Note 218.
-
- - --eric
-
- * | Eric W. Douglas Technojock +1 209 897 5785 | *
- * | I'net: ericd@caticsuf.csufresno.edu ericd@csufres.csufresno.edu | *
- * | AppleLink: STUDIO.D Compuserve: 76170,1472 AOL: EWDOUGLAS | *
- * | "if q -> p, and not p, then not q. NOT!" | *
-
- +++++++++++++++++++++++++++
-
- From: erh0362@tesla.njit.edu
- Date: 22 Mar 92 20:30:26 GMT
- Organization: New Jersey Institute of Technology
-
- >> Noodling around in Inside Mac I discovered the NewPtr() and
- >>NewHandle() functions which seem roughly equivalent to the standard
- >>library's malloc(). I also found __NewPtr which seems to be an assembly
- >>equivalent that has the nice feature of allowing one to clear the memory
- >>first before using it like the standard libraries calloc(). Not being an
- >>assembly hacker however I was wondering if there's a way in straight
- >>THINK C to use NewPtr() or something equivalent to get either a handle
- >>or a pointer to a block of cleared memory?
- >
- > Use NewPtrClear() or NewHandleClear()... both of these are illustrated
- > in Tech Note 218.
- >
- > --eric
- >
- > * | Eric W. Douglas Technojock +1 209 897 5785 | *
- > * | I'net: ericd@caticsuf.csufresno.edu ericd@csufres.csufresno.edu | *
-
- Thanks. NewPtrClear worked perfectly. I wonder if anyone knows why
- that's not documented in IM II-1 (or at least the version in Spinside Mac).
- Now if someone could only point in the direction of a Toolbox replacement for
- <assert.h> I could completely eliminate the UNIX beginnings of my program. I've
- seen reference to a function called MemError() but I don't know what exactly to
- pass it when I want to check that an allocation has succeeded or what to test
- for in its return.
-
- Elliotte Rusty Harold elharo@shock.njit.edu
- (who really needs to buy a few more technical manuals or enough hard disk space
- to hold SpinSide Mac so he can stop asking all these basic questions)
-
- +++++++++++++++++++++++++++
-
- From: keith@Apple.COM (Keith Rollin)
- Date: 23 Mar 92 03:06:25 GMT
- Organization: Apple Computer Inc., Cupertino, CA
-
- In article <1992Mar22.093224.1@tesla.njit.edu> erh0362@tesla.njit.edu writes:
- >
- > Noodling around in Inside Mac I discovered the NewPtr() and
- >NewHandle() functions which seem roughly equivalent to the standard
- >library's malloc(). I also found __NewPtr which seems to be an assembly
- >equivalent that has the nice feature of allowing one to clear the memory
- >first before using it like the standard libraries calloc(). Not being an
- >assembly hacker however I was wondering if there's a way in straight
- >THINK C to use NewPtr() or something equivalent to get either a handle
- >or a pointer to a block of cleared memory?
-
- NewPtrClear() and NewHandleClear() will do this for you. They are
- documented in IM VI and in one of the Macintosh Technote (somewhere in
- the low 200's). You'll also find them in your header files.
-
- - --
- - ------------------------------------------------------------------------------
- Keith Rollin --- <Taligent .signature under construction>
- Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
-
- +++++++++++++++++++++++++++
-
- From: russotto@eng.umd.edu (Matthew T. Russotto)
- Date: 23 Mar 92 15:19:04 GMT
- Organization: College of Engineering, University of Maryland, College Park
-
- In article <1992Mar22.093224.1@tesla.njit.edu> erh0362@tesla.njit.edu writes:
- >
- > Noodling around in Inside Mac I discovered the NewPtr() and
- >NewHandle() functions which seem roughly equivalent to the standard
- >library's malloc(). I also found __NewPtr which seems to be an assembly
- >equivalent that has the nice feature of allowing one to clear the memory
- >first before using it like the standard libraries calloc(). Not being an
- >assembly hacker however I was wondering if there's a way in straight
- >THINK C to use NewPtr() or something equivalent to get either a handle
- >or a pointer to a block of cleared memory?
-
- On reasonably new versions, you can use NewPtrClr (or is it
- NewPtrClear). On older versions, you can write your own:
-
- Ptr NewPtrClear(long size)
- {
- asm {
- MOVE.L (A7)+, D0
- DC.W 0xA15E ; Double check that number-- I may have
- it wrong!
- MOVE.L A0,D0
- }
- }
- - --
- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu
- Some news readers expect "Disclaimer:" here.
- Just say NO to police searches and seizures. Make them use force.
- (not responsible for bodily harm resulting from following above advice)
-
- +++++++++++++++++++++++++++
-
- From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
- Date: 26 Mar 92 02:46:18 GMT
- Organization: MacDTS, Apple Computer
-
- In article <1992Mar22.093224.1@tesla.njit.edu>, erh0362@tesla.njit.edu writes:
- >
- >
- > Noodling around in Inside Mac I discovered the NewPtr() and
- > NewHandle() functions which seem roughly equivalent to the standard
- > library's malloc(). I also found __NewPtr which seems to be an assembly
- > equivalent that has the nice feature of allowing one to clear the memory
- > first before using it like the standard libraries calloc(). Not being an
- > assembly hacker however I was wondering if there's a way in straight
- > THINK C to use NewPtr() or something equivalent to get either a handle
- > or a pointer to a block of cleared memory?
-
- Try NewHandleClear() and NewPtrClear(). Note that there is also a system-heap
- option, which can be used with NewHandleSys() and NewPtrSys(). For maximum
- enjoyment, try NewHandleSysClear() and NewPtrSysClear().
-
- Enjoy!
- Tim Dierks
- MacDTS, but I speak for myself
-
- ---------------------------
-
- From: jhp@wpi.WPI.EDU (John Petrangleo)
- Subject: Sound resources
- Date: 22 Mar 92 15:11:39 GMT
- Organization: Worcester Polytechnic Institute
-
- I have been trying to use the sound manager routines to play sound
- resources with little success. I am using Think C 5.0 and System 7.
-
- If the sound resource is in the .rsrc file, there is no problem.
- They sound plays normally. But if the sound resource is in the
- system file, I get an error saying that the sound is either corrupt
- or unavailable. Maybe I'm not understanding the concept behind system
- resources, but I though that if a resource is in the system file, I
- could just use that ID to use it as if it were in my own resource file.
-
- Thanks
-
- - ---------------
- jhp@wpi.wpi.edu
- - ---------------
-
- +++++++++++++++++++++++++++
-
- From: REEKES@applelink.apple.com (Jim Reekes)
- Date: 26 Mar 92 23:31:06 GMT
- Organization: Apple Computer, Inc.
-
- In article <1992Mar22.151139.5769@wpi.WPI.EDU>, jhp@wpi.WPI.EDU (John Petrangleo) writes:
- >
- > I have been trying to use the sound manager routines to play sound
- > resources with little success. I am using Think C 5.0 and System 7.
- >
- > If the sound resource is in the .rsrc file, there is no problem.
- > They sound plays normally. But if the sound resource is in the
- > system file, I get an error saying that the sound is either corrupt
- > or unavailable. Maybe I'm not understanding the concept behind system
- > resources, but I though that if a resource is in the system file, I
- > could just use that ID to use it as if it were in my own resource file.
-
- Show us your code, so we can see what's wrong...
-
- This works for me...
-
- err = SndPlay (nil, GetResource('snd ', 5), false);
-
- It get the system resource and plays it. But don't assume you know what
- resources are in the System file. The only one that _has_ to be there
- is ID=1, and this is SimpleBeep. All of the others can be removed and
- renamed.
-
- - -----------------------------------------------------------------------
- Jim Reekes, E.O. | Macintosh Toolbox Engineering
- | Sound Manager Expert
- Apple Computer, Inc. | "All opinions expressed are mine, and do
- 20525 Mariani Ave. MS: 81-KS | not necessarily represent those of my
- Cupertino, CA 95014 | employer, Apple Computer Inc."
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-